Mega Code Archive

Categories
1) Android
2) ASP.Net
3) ASP.Net Tutorial
4) C
5) C Tutorial
6) C#
7) C# Book
8) C# by API
9) C# Tutorial
10) C++
11) C++ Tutorial
12) Delphi
13) Flash ActionScript
14) Flex
15) Java
16) Java Book
17) Java by API
18) Java Tutorial
19) JavaScript DHTML
20) JavaScript Reference
21) JavaScript Tutorial
22) MSOfficeExcel 2007 Tutorial
23) MSOfficePowerPoint 2007 Tutorial
24) MSOfficeWord 2007 Tutorial
25) MSSQL
26) MSSQL Tutorial
27) MySQL
28) MySQL Tutorial
29) Oracle PLSQL
30) Oracle PLSQL Tutorial
31) Perl
32) Php
33) PostgreSQL
34) Python
35) Python Tutorial
36) Ruby
37) Silverlight
38) VB.Net
39) VB.Net by API
40) VB.Net Tutorial
41) Visual C++ .NET
42) VisualBasic Script
43) XML
44) XML Tutorial
 
Ruby
1) Active Record
2) Array
3) CGI
4) Class
5) Collections
6) Database
7) Date
8) Design Patterns
9) Development
10) File Directory
11) GUI
12) Hash
13) Language Basics
14) Method
15) Network
16) Number
17) Rails
18) Range
19) Reflection
20) Statement
21) String
22) Threads
23) Time
24) Tk
25) Unit Test
26) Windows Platform
27) XML
Number
1) 1 2 && nil
2) Absolute value and sign
3) Add absolute_approx to float class
4) Add approx method to Float number
5) Add commas to a big integer value
6) Add double_upto method to Fixnum
7) Add two rational number up
8) Add value to BigDecimal
9) An integer with the kind_of method (this method is from the Object class)
10) ArgumentError
11) Basic Math Operations for integer
12) Big decimal calculation
13) Binary bit shift left and right
14) Binary number with 0b
15) Bit and, or
16) Calculating a factorial in Ruby
17) Calculation on BigDecimal in a function
18) Call abs method on negative integer
19) Call abs method on positive integer
20) Change x from an integer to a floating point with the to_f method from the Fixnum class
21) Check whether a floating-point value is a number at all with Floats nan
22) Check whether a number is finite or infinite with the finite and infinite
23) Class constants
24) Coerce on float and Rational number
25) Comparable operator on rational numbers
26) Compare two floats for a certain precision
27) Compare two rational numbers
28) Comparison Methods
29) Constant value interpolation
30) Constants in Float
31) Convert a binary number from a string
32) Convert a character code
33) Convert a floating-point number
34) Convert a hexadecimal number
35) Convert a string
36) Convert an octal number
37) Convert BigDecimal to string
38) Convert float to string
39) Convert integer to char
40) Convert integer to string by parameter
41) Convert string to float
42) Convert string to hex
43) Convert string to integer (hex)
44) Convert string to integer (oct)
45) Convert string to integer by parameter
46) Convert string to integer with error
47) Convert string to number with non number string
48) Convert string to oct
49) Converting Between Characters and Values
50) Converting Between Classes
51) Create a rational number
52) Create an exponent
53) Create binary numbers by prefacing them with 0b
54) Create floating-point numbers simply by using a decimal point
55) Create hexadecimal numbers - base 16 - by prefacing them with 0x
56) Create octal number - base eight - numbers by prefacing them with a 0
57) Create or convert floating-point numbers with Kernels Float method
58) Declare the Variables to Store the Details
59) Difference between puts x y and puts x to_f y to_f
60) Divide two rational numbers
61) Extend the Fixnum class with some helper methods to make manipulating dates easier
62) Find out the ancestors of Fixnum
63) Find out the modules Numeric class resides
64) Fixnum literal value
65) Float predicates
66) Float value step
67) Floating Point Numbers
68) Floor Returns the largest integer less than or equal
69) General Predicates
70) Generates 25 prime numbers from 2 to 97
71) Generating Prime Numbers with succ
72) Get next from a char converted from an integer
73) Get the ceiling integer from a float
74) Get the ceiling or floor of a number (from Float, Integer, or Numeric)
75) Get the character value of an integer with chr
76) Get the corresponding char
77) Get the flooring integer from a float
78) Get the next from a negative number
79) Get the next integer with next (or its alias succ)
80) Get the next value for a positive number
81) Get the square root for a BigDecimal
82) Hex number with 0x
83) add (+), subtract (-), multiply (), and divide () fractions
84) create a fraction
85) perform modulo (%), power (), and equality (== or =)
86) produce a string or a float representation of a fraction (inspect)
87) If a value is a zero or not
88) If it is a nonzero
89) If it is an integer
90) If it is not a zero, then
91) Infinite Returns nil,1,or +1 depending on whether flt is finite
92) Inspect a not-a-number
93) Inspect a rational number
94) Integer and Float
95) Integer is an instance of the Fixnum class, which inherits the Integer class
96) Integer passed into a string with interpolation
97) Integer predicates
98) Is a divide by zero finite
99) Is a divide by zero infinite
100) Is a float finite
101) Is a number integer
102) Is it a nonzero
103) Is it a zero
104) Is it an integer
105) Is it between a range
106) Is it infinite
107) Is it not a number
108) Large Numbers
109) List the modules which Integer class is from
110) Make number easier to read by using underscores every three digits from the right
111) Math class and module hierarchy
112) Matrix in action
113) Modulo two rational numbers
114) Modulo(numeric)
115) More Math Methods
116) Multiply two rational numbers
117) Next from 2008 as an integer
118) Next number of 999
119) NoMethodError
120) Normal-looking math equations when you use operator methods, such as +
121) Number Introduction
122) Number parser by regular expressons
123) Numbers are classes
124) Oct number with 0o
125) Or round a number up or down (Float, Integer, or Numeric)
126) Output the modules where Fixnum lives
127) Parsing A Number From A String
128) Pass code block into each
129) PI in BigDecimal
130) Power a rational number
131) Precs of BigDecimal
132) Prime Numbers
133) Puts 120 chr
134) Raise ArgumentError from method
135) Rational number without using Rational class
136) Rational Numbers
137) Redefine basic arithmetic
138) Round 100 45
139) Round 100 49
140) Round 100 5
141) Round 100 6
142) Round a BigDecimal
143) Round a float
144) Round Rounds to the nearest integer
145) Rounding methods
146) Ruby has a number of classes and modules related to numbers
147) Shift left
148) Shift right
149) Simulating a Subclass of Fixnum
150) Split a big number
151) String interpolation with calculation
152) String interpolation with method call
153) Substituting Variables Into Strings
154) Subtract one number from another
155) The integer method comes from the Numeric class
156) The percentage
157) This matrix rotates counterclockwise around the origin
158) This matrix scales a point by sx,sy
159) To integers, using to_i
160) To_f cuts numbers
161) To_i gives the integer version of an object, and to_f gives the float version
162) to_s(F)
163) Try weird conversions
164) Two transformations in one
165) Use each method from Prime class
166) Use if statement to check zero
167) Use Prime to generate prime numbers
168) Using Complex Numbers
169) Value of not-a-number
170) What is the start of Bignum